{template 'header'}
<ul class="nav nav-tabs">
    <li class=""><a href="{php echo $this->createWeburl('posters');}">海报背景管理</a></li>
    <li class="active"><a href="{php echo $this->createWeburl('posters', array('op' => 'addShow'));}">添加海报背景</a></li>
</ul>
<form action="" method="post" class="form-horizontal" id="myform" role="form" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">小图标:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('icon', $bool['icon'], tomedia($bool['icon']));}
            <label style="color: red    ">50 * 50</label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">背景图:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('bg', $bool['bg'], tomedia($bool['bg']));}
            <label style="color: red    "> 670 * 960</label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">获颜颜色代码:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="margin-top:8px">
            <span style="color: red"> 切记！！！RGB 演示代码前面有个 #</span><br>
            <span style="color: red"><a href="https://link.fobshanghai.com/rgbcolor.htm" target="_blank">点击我获取RGB颜色代码</a></span>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">文字颜色:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="color" placeholder="文字颜色" value="{$bool['color']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>
        <div class="" >
            <input type="hidden" name="op" value="{php echo $bool['key'] !='' ? 'edit' : 'add'}">
            <input type="hidden" name="key" value="{$bool['key']}">
            <input type="submit" name="submit" id="submit" value="{php echo $id ? '修改' : '新增'}" class="btn btn-primary">
        </div>
    </div>
</form>
{template 'footer'}


<script>
    $(function () {
        $("input[name='type']").click(function () {
            if ( $(this).val() ==1 || $(this).val() == 3) {
                $('#appId').hide();
                $('#url').show();
            } else if ($(this).val() == 4 ) {
                $('#appId').hide();
                $('#url').hide();
            } else {
                $('#appId').show();
            }
        });
    })


</script>